from django.urls import path
from . import views
'''
1. Add an import:  from my_app import views
2. Add a URL to urlpatterns:  path('', views.home, name='home')
'''

app_name = 'main'
# 应用路由
urlpatterns = [
    # 第一个参数是路由路径，第二个参数是路由对应的视图路由
    # 第三个参数是路由名字
    path('', views.index, name="index"),
    path('about/', views.about, name="about"),
    path('detail/<int:num>', views.detail, name="detail"),
    path('recommend/', views.recommend, name="recommend"),
    path('load_data/', views.load_data, name="load_data"),
]